package com.ml.mall.service.order;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ml.mall.bean.base.ApiRestResult;
import com.ml.mall.bean.page.Page;
import com.ml.mall.bean.req.BaseBeanReq;
import com.ml.mall.bean.req.CouponListCheckReq;
import com.ml.mall.bean.req.order.OrderEditReq;
import com.ml.mall.bean.req.order.OrderNewReq;
import com.ml.mall.bean.req.order.OrderQueryPageReq;
import com.ml.mall.bean.res.couppon.CoupponCheckRes;
import com.ml.mall.bean.res.order.OrderQueryOneRes;
import com.ml.mall.bean.res.order.OrderQueryPageRes;
import com.ml.mall.bean.res.vo.SupplierOrderVO;
import com.ml.mall.entity.order.SysOrder;

import java.math.BigDecimal;
import java.util.List;

/**
* <p>
    *  服务类
    * </p>
*
* @author kyyang
* Created 2021-05-24
*/
public interface SysOrderCoupponService extends IService<SysOrder> {
    /**
     *
     * @param
     * @return
     * @author Daizh
     * @date 2021/7/8 17:52
     */
    CoupponCheckRes checkCouponByCouponCode(CouponListCheckReq req);


    /**
     *  计算优惠券可抵扣的金额；并创建优惠券的使用记录
     * @param supplierOrders  购物车缓存里面的卖家订单
    	 * @param cupponCodes  优惠券列表
     * @return java.math.BigDecimal
     * @author Daizh
     * @date 2021/7/14 9:38
     */
    BigDecimal countCoupponMoneyAndCreatCoupponRecode(List<SupplierOrderVO> supplierOrders, List<String> cupponCodes,Long oid);

    /**
     * 创建订单关联的优惠券记录
     * */


}
